CLI: Verify SDK v0.85.0 coverage and add managed-auth, replay, and credential flags - #210
Merged
Conversation
… timeline
Updates github.com/kernel/kernel-go-sdk to 65f3b913775353974858c92a6164ae25232ecc81
(v0.84.0).
A full enumeration of api.md methods against the CLI service interfaces found no
missing commands: all 128 SDK methods are covered (the one x-cli-skip endpoint,
POST /auth/connections/{id}/exchange, is correctly absent). The only API surface
change in this SDK bump is a new response field, ManagedAuthTimelineEvent.
TelemetryCaptured, so no new flags were needed.
Surfaces that field as a "Telemetry" column in `kernel auth connections timeline`,
so users can tell which timeline events have browser telemetry available via
`kernel browsers telemetry events`. The column shows "-" when the event has no
browser session or when the API does not report the field, and yes/no otherwise.
JSON output already passes the field through verbatim.
Tested against the live API:
- kernel auth connections timeline <id> --per-page 5 (three connections)
- kernel auth connections timeline <id> --per-page 2 --output json
- kernel auth connections list, kernel browsers list, kernel profiles list
- go build ./... and go test ./... pass
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Updates github.com/kernel/kernel-go-sdk to
e6dff4a41334b0008f7d0469bf83477905cdc589 (v0.85.0).
Full enumeration of all 127 SDK methods in api.md against the CLI command
tree found no missing commands. The only coverage gap was a new param field
on ProxyNewParamsConfigCustom.
New flags on `kernel proxies create`:
- --ca-bundle: inline PEM-encoded CA certificate bundle
- --ca-bundle-file: read the bundle from a file ('-' for stdin)
The two are mutually exclusive; the bundle is rejected early if it is not
PEM-encoded, and warned about (ignored) for non-custom proxy types.
Surfaces the new has_ca_bundle response field:
- `proxies get` / `proxies check`: "Has CA Bundle" row
- `proxies list`: "CA bundle" marker in the Config column
- `proxies create`: confirms the write-only bundle was stored
Tested:
- Real API: `proxies create --type custom --ca-bundle-file` reaches
server-side ca_bundle validation ("ca_bundle must be 65536 bytes or less,
got 80569" for an oversized bundle; a valid bundle passes that check and
only fails the live proxy connection test, as no reachable MITM proxy is
available from CI). No resources leaked.
- Local mock API: verified the wire body carries the full PEM as `ca_bundle`
for inline, file, and stdin inputs, and that has_ca_bundle renders in
create/get/list/check output.
- Flag errors: mutual exclusion, non-PEM input, missing file, non-custom
warning.
- go build ./..., go vet ./..., go test ./... all pass (6 new unit tests).
Triggered by: kernel/kernel-go-sdk@e6dff4a
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
SDK e6dff4a is the v0.85.0 tag the CLI already pins, so go.mod is unchanged
and the api.md diff against the previous version is empty. A full enumeration
of all 128 SDK methods and 286 request-param fields was performed anyway,
which surfaced pre-existing coverage gaps that are closed here.
Fix broken merge in cmd/proxies:
The merge of main into this branch unioned two independent implementations of
the proxy CA bundle feature, leaving the tree uncompilable (undefined io,
in.CaBundle on a struct without that field). Resolved to main's shipped
--ca-bundle <path> semantics and dropped the duplicate inline/stdin variant,
which would otherwise have silently redefined --ca-bundle for existing users.
New flags:
- kernel auth connections create --record-session / --no-health-checks /
--no-auto-reauth (ManagedAuthCreateRequestParam.{RecordSession,HealthChecks,
AutoReauth})
- kernel auth connections update --record-session / --no-record-session,
--health-checks / --no-health-checks, --auto-reauth / --no-auto-reauth
(ManagedAuthUpdateRequestParam, tri-state: omitting both leaves the
connection's current value untouched)
- kernel auth connections login --record-session / --no-record-session
(AuthConnectionLoginParams.RecordSession, per-login override)
- kernel browsers replays start --record-audio
(BrowserReplayStartParams.RecordAudio)
- kernel credentials update --remove-value-key
(UpdateCredentialRequestParam.RemoveValueKeys)
BrowserCurlParams.{TimeoutMs,ResponseEncoding} are intentionally left
unexposed: kernel browsers curl does not call the SDK's Curl method, it
proxies through a raw HTTP client for binary-safe streaming. --max-time
already covers the timeout, and response encoding is meaningless when raw
bytes go straight to stdout.
Tested against the live API:
- auth connections create --record-session --no-health-checks --no-auto-reauth
-> response echoed record_session=true, health_checks=false,
auto_reauth=false
- auth connections update, both directions, plus an unrelated-field-only
update confirming omitted toggles are left untouched
- mutually-exclusive pairs rejected (--health-checks with --no-health-checks)
- credentials update --remove-value-key removed the key; combined with
--value on the same key, the new value is kept (removal applied first)
- browsers replays start --record-audio -> started, stopped, listed
- request bodies captured against a local listener confirming tri-state on the
wire: {"record_audio":true} / {} and {"record_session":true} /
{"record_session":false} / {}
- all test resources deleted; go build, go vet, gofmt and go test ./... pass
Triggered by: kernel/kernel-go-sdk@e6dff4a
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7f6bf41. Configure here.
rgarcia
approved these changes
Jul 31, 2026
rgarcia
left a comment
Contributor
There was a problem hiding this comment.
Reviewed after conflict reconciliation and record-session tri-state cleanup. Full tests, build, security scans, and Bugbot pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR updates the Go SDK to e6dff4a41334b0008f7d0469bf83477905cdc589 and adds CLI flags for uncovered SDK request-param fields.
SDK Update
e6dff4a41334b0008f7d0469bf83477905cdc589is thev0.85.0tag, whichgo.modalready pinned.go get+go mod tidyresolved to the same version, so there is no dependency change in this push. The api.md diff against the CLI's previous SDK version is empty.Coverage Analysis
A full enumeration was performed rather than relying on the (empty) diff:
api.md— all have corresponding CLI commands. The three that don't call the plain SDK method (Browsers.Logs.Stream,Browsers.Telemetry.Stream,Browsers.Process.StdoutStream) use the SSE*Streamingvariants and are covered bybrowsers logs stream,browsers telemetry stream, andbrowsers process stdout-stream.*Params/*Paramstructs and checked against every identifier incmd/andpkg/. This surfaced 8 pre-existing gaps, closed below.x-cli-skip: true(POST /auth/connections/{id}/exchange, the hosted login UI's handoff exchange) is correctly absent.Build Fix
The merge of
maininto this branch unioned two independent implementations of the proxy CA bundle feature (this branch's, and #212 onmain), leaving the tree uncompilable —undefined: io, andin.CaBundlereferenced on a struct without that field.Resolved to main's shipped
--ca-bundle <path>semantics and dropped the duplicate inline/stdin variant. Worth noting: keeping both would have silently redefined--ca-bundlefrom "path to a PEM file" to "inline PEM content" for anyone already using the flag frommain.New Flags
kernel auth connections create --record-sessionManagedAuthCreateRequestParam.RecordSessionkernel auth connections create --no-health-checksManagedAuthCreateRequestParam.HealthCheckskernel auth connections create --no-auto-reauthManagedAuthCreateRequestParam.AutoReauthkernel auth connections update --health-checks/--no-health-checksManagedAuthUpdateRequestParam.HealthCheckskernel auth connections update --auto-reauth/--no-auto-reauthManagedAuthUpdateRequestParam.AutoReauthkernel browsers replays start --record-audioBrowserReplayStartParams.RecordAudiokernel credentials update --remove-value-keyUpdateCredentialRequestParam.RemoveValueKeys--record-sessionis a single tri-state boolean on create, update, and login: omitting it leaves the API default or existing connection setting untouched,--record-sessionsends true, and--record-session=falsesends false. The remaining positive/negative update pairs are marked mutually exclusive.Deliberately Not Added
BrowserCurlParams.TimeoutMsandBrowserCurlParams.ResponseEncoding.kernel browsers curldoes not call the SDK'sCurlmethod — it proxies through a raw HTTP client (browsers.HTTPClient) for binary-safe streaming, header dumping, and--write-out.--max-timealready covers the timeout, and response encoding is meaningless when raw bytes go straight to stdout or-o. Adding either flag would give the user a knob wired to nothing.Testing
Against the live API, with all resources deleted afterward:
auth connections create --record-session --no-health-checks --no-auto-reauth→ response echoedrecord_session=true,health_checks=false,auto_reauth=falseauth connections updateexercised in both directions, plus an unrelated-field-only update (--health-check-interval 3600) confirming omitted toggles are left untouchedcredentials update --remove-value-key otp_backup→ key removed;--remove-value-key password --value password=newsecret→ new value kept, confirming removals apply before the mergebrowsers replays start --record-audio→ started, stopped, and listed successfully{"record_audio":true}vs{}, and{"record_session":true}/{"record_session":false}/{}go build ./...,go vet ./...,gofmt -l cmd/, andgo test -count=1 ./...all passTriggered by: kernel/kernel-go-sdk@e6dff4a
Reviewer: @stainless-app
Note
Low Risk
Changes are additive CLI-to-API mappings and display tweaks; managed-auth toggles affect connection behavior only when users set them explicitly.
Overview
Wires previously uncovered Go SDK request fields into the CLI and tightens a few command outputs.
Managed auth (
kernel auth connections) gains flags for health checks, auto re-auth, and session recording: create uses--no-health-checks,--no-auto-reauth, and--record-session; update adds paired--health-checks/--no-health-checksand--auto-reauth/--no-auto-reauth(tri-state, like save-credentials) plus--record-session; login can override recording per flow.timelineadds a Telemetry column (yes/no when the event has a browser session and the API reportstelemetry_captured).Browsers
replays startadds--record-audio. Credentialsupdateadds repeatable--remove-value-key(applied before--valuemerges). SharedreadBoolFlagdistinguishes omitted bool flags from explicitfalse.Proxies surface Has CA Bundle in check/get/list/create output, warn when
--ca-bundleis used on non-custom types, and note CA bundle on custom proxy list lines.Reviewed by Cursor Bugbot for commit 174f857. Bugbot is set up for automated code reviews on this repo. Configure here.